package com.yinp.proapp.module.work.activity;

import android.view.LayoutInflater;
import android.view.View;

import com.yinp.proapp.R;
import com.yinp.proapp.base.activity.AppBaseActivity;
import com.yinp.proapp.base.activity.BaseActivity;
import com.yinp.proapp.databinding.ActivityDownSelectDialogBinding;
import com.yinp.proapp.utils.StatusBarUtil;

public class DownSelectDialogActivity extends AppBaseActivity<ActivityDownSelectDialogBinding> {
    View viewOne;
    View viewTwo;

    //onCreate调用的方法
    @Override
    protected void initViews() {
        setStatusBarHeight(StatusBarUtil.getStatusBarHeight(mContext));
        bd.btnOne.setOnClickListener(v -> {
            bd.dsdDialog.mAddView((viewOne == null ? initViewOne() : viewOne), "viewOne");
        });
        bd.btnTwo.setOnClickListener(v -> {
            bd.dsdDialog.mAddView((viewTwo == null ? initViewTwo() : viewTwo), "viewTwo");
        });
//        dsvView.endAnimation();可以通过调用主动结束
    }

    private View initViewOne() {
        viewOne = LayoutInflater.from(this).inflate(R.layout.layout_one_one, null);
        //可处理逻辑
        return viewOne;
    }

    private View initViewTwo() {
        viewTwo = LayoutInflater.from(this).inflate(R.layout.layout_one_two, null);
        //可处理逻辑
        return viewTwo;
    }
}